/*
 * H264ByteStreamLiveSource.hh
 *
 *  Created on: 2014-4-9
 *      Author: root
 */

#ifndef _H264FRAMEDLIVESOURCE_HH
#define _H264FRAMEDLIVESOURCE_HH
#include <FramedSource.hh>
#include "VideoCamera.hh"
class H264FramedLiveSource : public FramedSource
{
public:
	static H264FramedLiveSource* createNew(UsageEnvironment& env,
		char const* fileName,
		unsigned preferredFrameSize = 0,
		unsigned playTimePerFrame = 0);

protected:
	H264FramedLiveSource(UsageEnvironment& env,
		char const* fileName,
		unsigned preferredFrameSize,
		unsigned playTimePerFrame);
	// called only by createNew()
	~H264FramedLiveSource();

private:
	// redefined virtual functions:
	virtual void doGetNextFrame();
	int TransportData( unsigned char* to, unsigned maxSize );
	VideoCamera *video_cam;
protected:
    FILE *fp;

} ;


#endif /* _H264FRAMEDLIVESOURCE_HH */
